package com.quick.develop.flowable.domain.dto.task;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.quick.develop.flowable.domain.BpmBaseDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @description  工作流任务相关-返回参数
 * @author junyuan.liu
 * @date 2022/5/11 14:54
 */

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("工作流任务相关-返回参数")
public class BpmTaskDTO extends BpmBaseDO implements Serializable {

    private static final long serialVersionUID = 3707708712754650883L;
    
    @ApiModelProperty("父任务ID")
    private String parentTaskId;
    
    @ApiModelProperty("任务名称")
    private String name;

    @ApiModelProperty("任务执行人Id")
    private String assignee;
    
    @ApiModelProperty("任务执行人")
    private String assigneeName;
    
    @ApiModelProperty("拥有者")
    private String owner;

    @ApiModelProperty(value = "任务结果",  notes = "参见 bpm_task_btn")
    private String result;

    @ApiModelProperty("流程类型")
    private String category;

    @ApiModelProperty(value = "会签点审批结果", notes = "Y代表同意，N代表不同意，只有会签点才有这个结论")
    private String multiResult;

    @ApiModelProperty(value = "删除原因", notes = "流程自动完成标识", example = "MI_END")
    private String deleteReason;
    
    @ApiModelProperty(value = "任务描述", notes = "标记一些特殊事项")
    private String description;

    @ApiModelProperty(value = "激活状态", example = "1", notes = "参见 SuspensionState 枚举")
    private Integer suspensionState;

    @ApiModelProperty("流程变量信息")
    private Object processVariables;

    @ApiModelProperty("任务耗时")
    private Long durationInMillis;

    @ApiModelProperty("任务创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("任务完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("任务意见")
    private List<BpmCommentDTO> commentList;

}
